package com.tuanzi.loan.web.bean.settlement;

import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.vo.request.settlement.GatheringSearchRequest;
import com.tuanzi.loan.vo.response.settlement.GatheringSearchResponse;
import com.tuanzi.loan.web.configuration.JSFListingBean;
import com.tuanzi.loan.web.lazy.settlement.GatheringInfoLazyDataModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.faces.bean.ViewScoped;

/**
 * @author caiwanlin
 * @create 2018-01-04 16:07
 */
@Data
@Debug
@Component
@ViewScoped
@EqualsAndHashCode(callSuper = true)
public class GatheringListBean extends JSFListingBean<GatheringSearchRequest,GatheringSearchResponse> {
    private static final long serialVersionUID = 2691645754642590548L;

    @PostConstruct
    private void init(){
        initLazyDataModel();
    }

    private void initLazyDataModel(){
        $ = new GatheringSearchRequest();
        lazyDataModel = new GatheringInfoLazyDataModel($);
    }

    public String onSee(){
        return redirect("/views/settlement/gathering-search/gathering-info.xhtml");
    }







}
